package com.gxz.boot.condition;

import javax.annotation.PostConstruct;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

@Cacheable
@Component
@ConditionalOnProperty(prefix = "spring",name = "application.name",havingValue = "true")
public class Test {
    public Test(){
        System.out.println("已经加载了");
    }

    @PostConstruct
    public void init(){
        System.out.println("加载完了都");
    }
}
